package br.com.foxinline.servico;

import br.com.foxinline.modelo.ProblemaRenal;
import java.util.List;
import javax.ejb.Stateless;

/**
 *
 * @author laverson
 */
@Stateless
public class ProblemaRenalServico extends ServicoGenerico<ProblemaRenal> {

    public ProblemaRenalServico() {
        super(ProblemaRenal.class);
    }

    public List<ProblemaRenal> autoComplete(String query) {
        List<ProblemaRenal> results = getEntityManager().createQuery("select p from " + ProblemaRenal.class.getSimpleName() + " p where lower(p.nome) like '%" + query.toLowerCase().trim() + "%'").getResultList();
        return results;
    }
}
